﻿CREATE PROCEDURE [dbo].[proc_Order_FinalPayment_GetlistCount]
	(
		@CompanyId int,
		@SWId int,
		@StartDate nvarchar(10),
		@EndDate nvarchar(10),
		@Stext nvarchar(50)
	)
AS
	Select Count(Id) From Order_PaymentRecord
	Where (@CompanyId=0 Or CompanyId=@CompanyId) and (@SWId=0 Or SWId=@SWId) and (Convert(nchar(10),CreateDate,120) between @StartDate and @EndDate) and (@Stext is null Or CusName like '%'+@Stext+'%' Or Salesman like '%'+@Stext+'%')
RETURN
